package io.gitee.xyuesheng.entity;

import java.util.Date;
import java.util.List;

public class Daily {
    private Long id;
//    private Long uid;

    private String digest;//摘要
    private String content;//日记内容

    //sql.date 只有年月日，没有时分秒
    private Date created;//日记创建时间

    private Integer views;
    private Integer stars;
    private Integer favorites;
    private Long updatedBy;
    private Character status;
    private String codeUrl;

    private User user;
    //去掉uid，已经封装到了user里面

    private List<Keyword> keywords;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

//    public Long getUid() {
//        return uid;
//    }
//
//    public void setUid(Long uid) {
//        this.uid = uid;
//    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Integer getViews() {
        return views;
    }

    public void setViews(Integer views) {
        this.views = views;
    }

    public Integer getStars() {
        return stars;
    }

    public void setStars(Integer stars) {
        this.stars = stars;
    }

    public Integer getFavorites() {
        return favorites;
    }

    public void setFavorites(Integer favorites) {
        this.favorites = favorites;
    }

    public Long getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(Long updateBy) {
        this.updatedBy = updateBy;
    }

    public Character getStatus() {
        return status;
    }

    public void setStatus(Character status) {
        this.status = status;
    }

    public String getCodeUrl() {
        return codeUrl;
    }

    public void setCodeUrl(String codeUrl) {
        this.codeUrl = codeUrl;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Daily{");
        sb.append("id=").append(id);
        sb.append(", digest='").append(digest).append('\'');
        sb.append(", content='").append(content).append('\'');
        sb.append(", created=").append(created);
        sb.append(", views=").append(views);
        sb.append(", stars=").append(stars);
        sb.append(", favorites=").append(favorites);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", status=").append(status);
        sb.append(", codeUrl='").append(codeUrl).append('\'');
        sb.append(", user=").append(user);
        sb.append(", keywords=").append(keywords);
        sb.append('}');
        return sb.toString();
    }

    public List<Keyword> getKeywords() {
        return keywords;
    }

    public void setKeywords(List<Keyword> keywords) {
        this.keywords = keywords;
    }
}
